package com.iwdnb.gkgz.common.enums;

import java.util.List;

import com.google.common.collect.Lists;
import com.iwdnb.bmnf.common.enums.CodeMessage;

/**
 * 二级行业枚举
 *
 * @see com.iwdnb.gkgz.infrastructure.dao.client.impl.MairuiClientImpl#initIndustryList()
 */
public enum StockSecondIndustryEnums implements CodeMessage {
    sw2_730200("sw2_730200", "通信设备"),
    sw2_730100("sw2_730100", "通信服务"),
    sw2_721000("sw2_721000", "电视广播Ⅱ"),
    sw2_720900("sw2_720900", "出版"),
    sw2_720700("sw2_720700", "数字媒体"),
    sw2_720600("sw2_720600", "影视院线"),
    sw2_720500("sw2_720500", "广告营销"),
    sw2_720400("sw2_720400", "游戏Ⅱ"),
    sw2_710400("sw2_710400", "软件开发"),
    sw2_710300("sw2_710300", "IT服务Ⅱ"),
    sw2_710100("sw2_710100", "计算机设备"),
    sw2_650500("sw2_650500", "军工电子Ⅱ"),
    sw2_650400("sw2_650400", "航海装备Ⅱ"),
    sw2_650300("sw2_650300", "地面兵装Ⅱ"),
    sw2_650200("sw2_650200", "航空装备Ⅱ"),
    sw2_650100("sw2_650100", "航天装备Ⅱ"),
    sw2_640700("sw2_640700", "自动化设备"),
    sw2_640600("sw2_640600", "工程机械"),
    sw2_640500("sw2_640500", "轨交设备Ⅱ"),
    sw2_640200("sw2_640200", "专用设备"),
    sw2_640100("sw2_640100", "通用设备"),
    sw2_630800("sw2_630800", "电网设备"),
    sw2_630700("sw2_630700", "电池"),
    sw2_630600("sw2_630600", "风电设备"),
    sw2_630500("sw2_630500", "光伏设备"),
    sw2_630300("sw2_630300", "其他电源设备Ⅱ"),
    sw2_630100("sw2_630100", "电机Ⅱ"),
    sw2_620600("sw2_620600", "工程咨询服务Ⅱ"),
    sw2_620400("sw2_620400", "专业工程"),
    sw2_620300("sw2_620300", "基础建设"),
    sw2_620200("sw2_620200", "装修装饰Ⅱ"),
    sw2_620100("sw2_620100", "房屋建设Ⅱ"),
    sw2_610300("sw2_610300", "装修建材"),
    sw2_610200("sw2_610200", "玻璃玻纤"),
    sw2_610100("sw2_610100", "水泥"),
    sw2_510100("sw2_510100", "综合Ⅱ"),
    sw2_490300("sw2_490300", "多元金融"),
    sw2_490200("sw2_490200", "保险Ⅱ"),
    sw2_490100("sw2_490100", "证券Ⅱ"),
    sw2_480500("sw2_480500", "农商行Ⅱ"),
    sw2_480400("sw2_480400", "城商行Ⅱ"),
    sw2_480300("sw2_480300", "股份制银行Ⅱ"),
    sw2_480200("sw2_480200", "国有大型银行Ⅱ"),
    sw2_461100("sw2_461100", "教育"),
    sw2_461000("sw2_461000", "旅游及景区"),
    sw2_460900("sw2_460900", "酒店餐饮"),
    sw2_460800("sw2_460800", "专业服务"),
    sw2_460600("sw2_460600", "体育Ⅱ"),
    sw2_450700("sw2_450700", "旅游零售Ⅱ"),
    sw2_450600("sw2_450600", "互联网电商"),
    sw2_450400("sw2_450400", "专业连锁Ⅱ"),
    sw2_450300("sw2_450300", "一般零售"),
    sw2_450200("sw2_450200", "贸易Ⅱ"),
    sw2_430300("sw2_430300", "房地产服务"),
    sw2_430100("sw2_430100", "房地产开发"),
    sw2_421100("sw2_421100", "航运港口"),
    sw2_421000("sw2_421000", "航空机场"),
    sw2_420900("sw2_420900", "铁路公路"),
    sw2_420800("sw2_420800", "物流"),
    sw2_410300("sw2_410300", "燃气Ⅱ"),
    sw2_410100("sw2_410100", "电力"),
    sw2_370600("sw2_370600", "医疗服务"),
    sw2_370500("sw2_370500", "医疗器械"),
    sw2_370400("sw2_370400", "医药商业"),
    sw2_370300("sw2_370300", "生物制品"),
    sw2_370200("sw2_370200", "中药Ⅱ"),
    sw2_370100("sw2_370100", "化学制药"),
    sw2_360500("sw2_360500", "文娱用品"),
    sw2_360300("sw2_360300", "家居用品"),
    sw2_360200("sw2_360200", "包装印刷"),
    sw2_360100("sw2_360100", "造纸"),
    sw2_350300("sw2_350300", "饰品"),
    sw2_350200("sw2_350200", "服装家纺"),
    sw2_350100("sw2_350100", "纺织制造"),
    sw2_340900("sw2_340900", "调味发酵品Ⅱ"),
    sw2_340800("sw2_340800", "休闲食品"),
    sw2_340700("sw2_340700", "饮料乳品"),
    sw2_340600("sw2_340600", "非白酒"),
    sw2_340500("sw2_340500", "白酒Ⅱ"),
    sw2_340400("sw2_340400", "食品加工"),
    sw2_330700("sw2_330700", "其他家电Ⅱ"),
    sw2_330600("sw2_330600", "家电零部件Ⅱ"),
    sw2_330500("sw2_330500", "照明设备Ⅱ"),
    sw2_330400("sw2_330400", "厨卫电器"),
    sw2_330300("sw2_330300", "小家电"),
    sw2_330200("sw2_330200", "黑色家电"),
    sw2_330100("sw2_330100", "白色家电"),
    sw2_280600("sw2_280600", "商用车"),
    sw2_280500("sw2_280500", "乘用车"),
    sw2_280400("sw2_280400", "摩托车及其他"),
    sw2_280300("sw2_280300", "汽车服务"),
    sw2_280200("sw2_280200", "汽车零部件"),
    sw2_270600("sw2_270600", "电子化学品Ⅱ"),
    sw2_270500("sw2_270500", "消费电子"),
    sw2_270400("sw2_270400", "其他电子Ⅱ"),
    sw2_270300("sw2_270300", "光学光电子"),
    sw2_270200("sw2_270200", "元件"),
    sw2_270100("sw2_270100", "半导体"),
    sw2_240600("sw2_240600", "能源金属"),
    sw2_240500("sw2_240500", "小金属"),
    sw2_240400("sw2_240400", "贵金属"),
    sw2_240300("sw2_240300", "工业金属"),
    sw2_240200("sw2_240200", "金属新材料"),
    sw2_230500("sw2_230500", "特钢Ⅱ"),
    sw2_230400("sw2_230400", "普钢"),
    sw2_230300("sw2_230300", "冶钢原料"),
    sw2_220900("sw2_220900", "非金属材料Ⅱ"),
    sw2_220800("sw2_220800", "农化制品"),
    sw2_220600("sw2_220600", "橡胶"),
    sw2_220500("sw2_220500", "塑料"),
    sw2_220400("sw2_220400", "化学纤维"),
    sw2_220300("sw2_220300", "化学制品"),
    sw2_220200("sw2_220200", "化学原料"),
    sw2_110900("sw2_110900", "农业综合Ⅱ"),
    sw2_110800("sw2_110800", "动物保健Ⅱ"),
    sw2_110700("sw2_110700", "养殖业"),
    sw2_110500("sw2_110500", "农产品加工"),
    sw2_110400("sw2_110400", "饲料"),
    sw2_110300("sw2_110300", "林业Ⅱ"),
    sw2_110200("sw2_110200", "渔业"),
    sw2_110100("sw2_110100", "种植业"),
    sw2_770300("sw2_770300", "医疗美容"),
    sw2_770200("sw2_770200", "化妆品"),
    sw2_770100("sw2_770100", "个护用品"),
    sw2_760200("sw2_760200", "环保设备Ⅱ"),
    sw2_760100("sw2_760100", "环境治理"),
    sw2_750300("sw2_750300", "炼化及贸易"),
    sw2_750200("sw2_750200", "油服工程"),
    sw2_750100("sw2_750100", "油气开采Ⅱ"),
    sw2_740200("sw2_740200", "焦炭Ⅱ"),
    sw2_740100("sw2_740100", "煤炭开采"),
    ;

    private String code;
    private String message;
    public static final String BLACK_CONTENT
        = "工程机械,服装家纺,专业工程,影视院线,教育,家居用品,计算机设备,燃气Ⅱ,农化制品,煤炭开采,一般零售,电池,自动化设备,油服工程,化学制药,白酒Ⅱ,专用设备,中药Ⅱ,家电零部件Ⅱ,证券Ⅱ,航运港口,"
        + "其他电源设备Ⅱ,电视广播Ⅱ,铁路公路,造纸,化学原料,渔业,食品加工,装修建材,生物制品,饮料乳品,汽车服务,种植业,基础建设,房地产开发,工业金属";
    public static final String BLACK_CONTENT2 =
        "铁路公路,工程机械,电池,包装印刷,航运港口,电视广播Ⅱ,装修建材,食品加工,化学原料,中药Ⅱ,计算机设备,化学制药,家电零部件Ⅱ,造纸,证券Ⅱ,医疗服务,工业金属,旅游及景区,"
            + "专用设备,半导体,自动化设备,其他电源设备Ⅱ,汽车服务,房地产服务,饰品,专业工程,渔业,生物制品,能源金属,燃气Ⅱ,摩托车及其他,地面兵装Ⅱ,航海装备Ⅱ,贵金属,教育,"
            + "饮料乳品,白酒Ⅱ,装修装饰Ⅱ,游戏Ⅱ,油服工程,基础建设,IT服务Ⅱ,影视院线,体育Ⅱ,电机Ⅱ,一般零售,化学纤维,林业Ⅱ,化妆品,房屋建设Ⅱ,数字媒体,休闲食品,养殖业,"
            + "农化制品,工程咨询服务Ⅱ,照明设备Ⅱ,保险Ⅱ,调味发酵品Ⅱ,油气开采Ⅱ";
    public static final List<String> BLACK_LIST = Lists.newArrayList(BLACK_CONTENT.split(","));

    StockSecondIndustryEnums(String code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public String getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public static StockSecondIndustryEnums getEnumByCodeOrName(String v) {
        for (StockSecondIndustryEnums bk : StockSecondIndustryEnums.values()) {
            if (bk.getCode().equals(v) || bk.getMessage().equals(v)) {
                return bk;
            }
        }
        return null;
    }

    public static boolean isBlackIndustry(String industry) {
        return BLACK_LIST.contains(industry);
    }
}
